package com.pan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pan.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface OperaterDao extends BaseMapper<User> {

    //修改部门
    @Update("update tbl_user set `deptno` = #{deptno} where id = #{id} and isadmin = 0")
    Boolean changeDeptno(Integer id,Integer deptno);

    //修改职位
    @Update("update tbl_user set `position` = #{position} where id = #{id} and isadmin = 0")
    Boolean changePosition(Integer id,String position);

    //修改薪水
    @Update("update tbl_user set `salary` = #{salary} where id = #{id} and isadmin = 0")
    Boolean changeSalary(Integer id,Integer salary);


}
